<template>
	<view>
		<block v-for="(item,index) in list" :key="index">
			<view class="index-li" @click="goH5" :data-index="index">
				<view class="index-li-top">
					<text class="index-li-top-text">{{item.title}}</text>
					<image class="index-li-top-img" src="/static/images/zhe.png"></image>
				</view>
				<view class="index-li-date">{{item.addtime}}</view>
			</view>
		</block>
	</view>
</template>

<script>
	// +----------------------------------------------------------------------
	// |万岳科技开源系统 [山东万岳信息科技有限公司]
	// +----------------------------------------------------------------------
	// | Copyright (c) 2020~2022 https://www.sdwanyue.com All rights reserved.
	// +----------------------------------------------------------------------
	// | 万岳科技相关开源系统代码并不是自由软件，未经授权许可不能去掉wanyue【万岳科技】相关版权并商用
	// +----------------------------------------------------------------------
	// | Author: 万岳科技开源官方 < wanyuekj2020@163.com >
	// +----------------------------------------------------------------------
	export default {
		props:{
			list:{
				type:Array,
				value:[]
			}
		},
		data() {
			return {

			}
		},
		methods: {
			goH5(e){
				var index = e.currentTarget.dataset.index;
				if(this.list[index].url_a){ //h5
					uni.navigateTo({
						url:'/pages/webview/index?url='+this.list[index].url_a
					})
				}else{
					uni.navigateTo({
						url:'/pages/webvideo/index?url='+this.list[index].url
					})
				}
			}
		}
	}
</script>

<style>
	.index-li{
		border-bottom: 1rpx solid #F0F0F0;
		padding: 30rpx 0 30rpx 0;
	}
	.index-li-top{
		clear: both;
		overflow: hidden;
		font-size: 38rpx;
	}
	.index-li-top-text{
	    width: 90%;
	    -webkit-line-clamp: 1;
	    text-overflow: ellipsis;
	    display: -webkit-inline-box;
	    -webkit-box-orient: vertical;
	    height: 55rpx;
	    overflow: hidden;
	}
	.index-li-top-img{
		width: 30rpx;
		height: 30rpx;
		float: right;
		margin-top: 10rpx;
	}
	.index-li-date{
	    margin-top: 14rpx;
	    font-size: 28rpx;
	    color: #969696;
	}
</style>
